import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { Lesson1Component } from './lesson1/lesson1.component';
import { Lesson2Component } from './lesson2/lesson2.component';
import { Lesson3Component } from './lesson3/lesson3.component';
import { Lesson4Component } from './lesson4/lesson4.component';
import { IonicModule } from './ionic/ionic.module';
import { Lesson5Component } from './lesson5/lesson5.component';
import { Lesson6Component } from './lesson6/lesson6.component';
import { Lesson7Component } from './lesson7/lesson7.component';
import { Lesson8Component } from './lesson8/lesson8.component';
import { Lesson9Component } from './lesson9/lesson9.component';
import { Lesson10Component } from './lesson10/lesson10.component';
import { Lesson11Component } from './lesson11/lesson11.component';
import { Lesson12Component } from './lesson12/lesson12.component';
import { Lesson4OneComponent } from './lesson4/lesson4-one/lesson4-one.component';
import { Lesson4TwoComponent } from './lesson4/lesson4-two/lesson4-two.component';
import { Lesson4ThreeComponent } from './lesson4/lesson4-three/lesson4-three.component';
import { Lesson4FourComponent } from './lesson4/lesson4-four/lesson4-four.component';
import { Lesson4FiveComponent } from './lesson4/lesson4-five/lesson4-five.component';
import { Lesson4SixComponent } from './lesson4/lesson4-six/lesson4-six.component';
import { Lesson4SevenComponent } from './lesson4/lesson4-seven/lesson4-seven.component';
const routes: Routes = [
  { path: '', redirectTo: 'lesson1', pathMatch: 'full' },
  { path: 'lesson1', component: Lesson1Component },
  { path: 'lesson2', component: Lesson2Component },
  { path: 'lesson3', component: Lesson3Component },
  { path: 'lesson4', component: Lesson4Component,
    children: [
      { path: '', redirectTo: 'one', pathMatch: 'full' },
      { path: 'one', component : Lesson4OneComponent },
      { path: 'two', component : Lesson4TwoComponent },
      { path: 'three', component : Lesson4ThreeComponent },
      { path: 'four', component : Lesson4FourComponent },
      { path: 'five', component : Lesson4FiveComponent },
      { path: 'six', component : Lesson4SixComponent },
      { path: 'seven', component : Lesson4SevenComponent }
    ]
  },
  { path: 'lesson5', component: Lesson5Component },
  { path: 'lesson6', component: Lesson6Component },
  { path: 'lesson7', component: Lesson7Component },
  { path: 'lesson8', component: Lesson8Component },
  { path: 'lesson9', component: Lesson9Component },
  { path: 'lesson10', component: Lesson10Component },
  { path: 'lesson11', component: Lesson11Component },
  { path: 'lesson12', component: Lesson12Component }
];

@NgModule({
  imports: [
    IonicModule,
    RouterModule.forRoot(routes)
  ],
  exports: [RouterModule]
})
export class AppRoutingModule { }
